package model

// SystemLog 操作日志表
type SystemLog struct {
	ID         int    `json:"id" gorm:"primaryKey;type:int;comment:'ID'"`
	UserId     int    `json:"user_id" gorm:"type:int;comment:'管理员ID'"`
	Username   string `json:"username" gorm:"type:varchar(30);comment:'管理员用户名'"`
	Url        string `json:"url" gorm:"type:varchar(1500);comment:'操作Url'"`
	Title      string `json:"title" gorm:"type:varchar(100);comment:'日志标题'"`
	Data       string `json:"data" gorm:"type:text;comment:'请求数据'"`
	Ip         string `json:"ip" gorm:"type:varchar(50);comment:'IP'"`
	Useragent  string `json:"useragent" gorm:"type:varchar(255);comment:'User-Agent'"`
	CreateTime int    `json:"create_time" gorm:"type:int;comment:'操作时间'"`
	Name       string `json:"name" gorm:"-"`
	Mobile     int    `json:"mobile" gorm:"-"`
}

func (SystemLog) TableName() string {
	return "system_log"
}
